<template>
	<!-- 拉运趟次列表 -->
	<view class="container">
		<topbar>拉运趟次列表</topbar>
		<scroll-view scroll-y class="scroll-box">
			<PullNumberItem v-for="item in listData" :key="item.id" :info="item"/>
			<up-empty mode="list" text='还没有数据' :show='listData.length==0' textSize='25' iconSize='25' width='200'
				height='200' icon="http://cdn.uviewui.com/uview/empty/list.png">
			</up-empty>
		</scroll-view>
	</view>
</template>

<script setup lang="ts">
	import { ref } from 'vue';
	import { onLoad } from '@dcloudio/uni-app'
	import PullNumberItem from '@/components/drivers/pullNumberItem/pullNumberItem.vue';
	import { planNumList } from "@/api/drivers/orderTaking.js"
	
	// 列表
	const listData = ref([]);
	onLoad((options) => {
		
		console.log("传过来的数据",options)
		getDetail(options.id)
	})
	
	function getDetail(orderId:any){
		let obj={
			id:orderId,
			settlementStatus:''
		}
		uni.showLoading({
			title: '正在加载中'
		});
		planNumList(obj).then(res => {
			console.log("订单数据333333",res)
			if (res.data.code == 0) {
				listData.value=res.data.data
				uni.hideLoading()
			} else {
				console.log("失败")
				uni.hideLoading()
			}
		})
	}
</script>

<style scoped lang="scss">
	.scroll-box {
		padding: 32rpx;
		height: 1400rpx;
		box-sizing: border-box;
		// background-color: skyblue;
	}
</style>